<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="dynamic-component-dome" class="dome">
        <!-- <my-component></my-component> -->
        <!-- <alert-box>
            Something bad happened.
          </alert-box> -->

        <button 
            v-for="" v-bind:key="tab" v-bind:class="['tab-button',{active:currentTab === tab}]" v-on:click="currentTab=tab">
          {{tab}}
        </button>
        <component v-bind:is="currentTabComponent" class="="tab>
            
        </component>
    </div>

    <!-- <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>

    <script>
        // 注册
        Vue.component('alert-box', {
            template: `
            <div class="demo-alert-box">
            <strong>Error!</strong>
            <slot></slot>
            </div>
        ` 
        })
        let app = new Vue({
            el: "#app",
            data: {

            }
        })
    </script>

</body>

</html>